/***************************************************************************
 创建者: 华磊
 开始时间: 2018.8.14
 copyright: (C) 华友高科
 修改说明: (每次有修改就添加一条，带有 修改人，修改时间，修改描述)
 example (1) hualei 2017.5.8 类的具体实现代码编写

 ***************************************************************************
 *  @file x.h
 *  功能:
 *
 *                                                                         *
 ***************************************************************************/
#ifndef LINE_H
#define LINE_H

#include "motioninstruction.h"
#include "ioinstruction.h"
#include "registerinstruction.h"
#include "labelinstruction.h"
#include "jumpinstruction.h"
#include "callinstruction.h"
#include "runinstruction.h"
#include "ifinstruction.h"
#include "selectinstruction.h"
#include "forinstruction.h"
#include "palinstruction.h"
#include "coordinateinstruction.h"
#include "waitinstruction.h"
#include "pauseinstruction.h"
#include "abortinstruction.h"
#include "endinstruction.h"
#include "ualminstruction.h"
#include "messageinstruction.h"
#include "overrideinstruction.h"
#include "timerinstruction.h"
#include "rsrinstruction.h"
#include "gripperinstruction.h"
#include "modbustartinstruction.h"
#include "modbusreadinstruction.h"
#include "modbuswriteinstruction.h"
#include "moveMagInstruction.h"
#include "moveFreeInstruction.h"
#include "tcpstartinstruction.h"
#include "tcpreadinstruction.h"
#include "tcpwriteinstruction.h"
#include "musicinstruction.h"
#include "odometryresetinstruction.h"
#include "charginginstruction.h"
#include "liftmechanisminstruction.h"
#include "loadmapinstruction.h"
#include "checkbatteryinstruction.h"
#include "waitcommandinstruction.h"
#include "robotmoveinstruction.h"
#include "rollerinstruction.h"
#include "visionruninstruction.h"
#include "visioncleardatainstruction.h"
#include "visiongetdatainstruction.h"
#include "visiontriggerinstruction.h"
#include "trackendinstruction.h"
#include "trackstartinstruction.h"
#include "trackgetdatainstruction.h"
#include "axismoveinstruction.h"
#include "prregisterinstruction.h"
#include "plregisterinstruction.h"
#include "weldstartinstruction.h"//拓展新指令Fundation增加代码20191122hualei
#include "weldendinstruction.h"
#include "weaveinstruction.h"
#include "weaveendinstruction.h"
#include "trackweldtastinstruction.h"
#include "trackweldendinstruction.h"
#include "watchdiinstruction.h"
#include "lasercamerapointfetchinstruction.h"
#include "lasercameractrlinstruction.h"
#include "lasercameratrackinstruction.h"
#include "laserscaninstruction.h"
#include "buffermoveinstruction.h"


#include <QVector>
#include <QString>
#include <QFile>


#ifndef PROGRAMSET_H
#define PROGRAMSET_H
#include "programset.h"
#endif

#include "instructionEnum.h"

/**
 * @brief The Line class 指令行数据存储容器类
 */
class Line
{
public:
    Line();

public:
    QString lineStr;
    bool isParsed;

    /**所有的指令类型，MOTION,WAIT,GOTO,JUMP,REG,IO,LABEL,RUN,SELECT,IF,CALL,FOR,ENDFOR*/
    INSTRUCTION_TYPE type;
    /**
     * @brief comment   注释
     */
//    QString comment;


    AxisMoveInstruction axisMove;
    /**
     * @brief motion        motion电机运动指令
     */
    MotionInstruction motion;
    /**
     * @brief io            io输入输出指令
     */
    IoInstruction io;
    /**
     * @brief reg           寄存器指令
     */
    RegisterInstruction reg;
    /**
     * @brief label         label标签指令
     */
    labelInstruction label;
    /**
     * @brief jump          jump指令
     */
    JumpInstruction jump;
    /**
     * @brief call          call指令
     */
    CallInstruction call;
    /**
     * @brief runInstruct       run指令
     */
    RunInstruction runInstruct;
    /**
     * @brief ifIns         if指令
     */
    IfInstruction ifIns;
    /**
     * @brief select            select指令
     */
    SelectInstruction select;
    /**
     * @brief forInstruct       for/endfor指令
     */
    ForInstruction forInstruct;
    /**
     * @brief palInstruct      码垛的开始和结束指令
     */
    PalInstruction palInstruct;
    /**
     * @brief coorInstruct      坐标系切换指令
     */
    CoorDinateInstruction coorInstruct;
    /**
     * @brief waitInstruct      等待指令
     */
    waitInstruction     waitInstruct;
    /**
     * @brief pauseInstruct         pause指令
     */
    PauseInstruction pauseInstruct;
    /**
     * @brief abortInstruct             ａｂｏｒｔ指令
     */
    AbortInstruction abortInstruct;
    /**
     * @brief endInstruct               ｅｎｄ指令
     */
    EndInstruction endInstruct;
    /**
     * @brief ualmInstruct              ｕａｌｍ指令
     */
    UalmInstruction ualmInstruct;
    /**
     * @brief messageInstruct       ｍｅｓｓａｇｅ指令
     */
    MessageInstruction messageInstruct;
    /**
     * @brief overrideInstruct          ｏｖｅｒｒｉｄｅ指令
     */
    OverrideInstruction overrideInstruct;
    /**
     * @brief timerInstruct                ｔｉｍｅｒ指令
     */
    TimerInstruction timerInstruct;
    /**
     * @brief rsrInstruct                   rsr指令
     */
    RsrInstruction rsrInstruct;
    /**
     * @brief gripperInstruct           grip指令
     */
    GripperInstruction gripperInstruct;


    /***********************************************************************
     * 日期：2018年6月1日
     * 修改人：hualei
     * 修改内容:添加 MODBUS_START、MODBUS_READ、MODBUS_WRITE 指令
     *
     * **********************************************************************/
    /**
     * @brief modbusStartInstruction   MODBUS_START指令
     */
    ModbusStartInstruction modbusStartInstruction;
    /**
     * @brief modbusReadInstruction   MODBUS_READ指令
     */
    ModbusReadInstruction modbusReadInstruction;
    /**
     * @brief modbusWriteInstruction
     */
    ModbusWrite modbusWriteInstruction;

    /***********************************************************************
     * 日期：2018年6月8日
     * 修改人：hualei
     * 修改内容:添加 MOVE_MAG、MOVE_FREE 指令
     *
     * **********************************************************************/
    /**
     * @brief moveMAG                   MOVE_MAG 指令
     */
    MoveMagInstruction moveMagInstruction;
    /**
     * @brief moveFreeInstruction       MOVE_FREE 指令
     */
    MoveFreeInstruction moveFreeInstruction;

    /***********************************************************************
     * 日期：      2018-09-05
     * 修改人：      hualei
     * 修改内容:  添加 TCP 指令
     * ********************************************************************/
    /**
     * @brief tcpStartInstruction       TCP_START指令
     *
     */
    TcpStartInstruction tcpStartInstruction;

    /**
     * @brief tcpReadInstruction        TCP_READ指令
     */
    TcpReadInstruction tcpReadInstruction;

    /**
     * @brief tcpWriteInstruction       TCP_WRITE指令
     */
    TcpWriteInstruction tcpWriteInstruction;

    /**
     * @brief musicInstruction          MUSIC 音乐指令
     */
    MusicInstruction musicInstruction;

    /**
     * @brief odometryResetInstruction  SET_ODOM 重置里程计指令
     */
    OdometryResetInstruction odometryResetInstruction;

    /**
     * @brief chargingInstruction           CHARGING 充电指令
     */
    ChargingInstruction chargingInstruction;

    /**
     * @brief liftMechanismInstruction      LIFT 升降机构指令
     */
    LiftMechanismInstruction liftMechanismInstruction;

    /**
     * @brief loadMapInstruction                LOAD_MAP记载地图指令
     */
    LoadMapInstruction loadMapInstruction;

    /**
     * @brief loadMapInstruction                LOAD_MAP记载地图指令
     */
    CheckBatteryInstruction checkBatteryInstruction;

    /**
     * @brief loadMapInstruction                WAIT_COMMAND等待呼叫
     */
    WaitCommandInstruction waitCommandInstruction;

    /**
     * @brief robotMoveInstruction              ROBOT_MOVE机械手控制
     */
    RobotMoveInstruction robotMoveInstruction;

    /**
     * @brief rollerInstruction                 ROLLER滚筒指令
     */
    RollerInstruction rollerInstruction;

    VisionRunInstruction visionRunInstruction;
    VisionClearDataInstruction visionClearDataInstruction;
    VisionTriggerInstruction visionTriggerInstruction;
    VisionGetDataInstruction visionGetDataInstruction;

    TrackStartInstruction trackStartInstruction;
    TrackEndInstruction trackEndInstruction;
    TrackGetDataInstruction trackGetDataInstruction;

    PrRegisterInstruction prRegisterInstruction;
    PlRegisterInstruction plRegisterInstruction;
    //拓展新指令Fundation增加代码20191122hualei
    WeldStartInstruction weldStartInstruction;
    WeldEndInstruction weldEndInstruction;
    WeaveInstruction weaveInstruction;
    WeaveEndInstruction weaveEndInstruction;
    TrackWeldTastInstruction trackWeldTastInstruction;
    TrackWeldEndInstruction trackWeldEndInstruction;
    WatchDIInstruction watchDIInstruction;
    LaserCameraPointFetchInstruction laserCameraPointFetchInstruction;
    LaserCameraCtrlInstruction laserCameraCtrlInstruction;
    LaserCameraTrackInstruction laserCameraTrackInstruction;
    LaserScanInstruction laserScanIns;
    BufferMoveInstruction bufferMoveIns;
};

#endif // LINE_H

